#-*- coding: utf8 -*-
from tutor.scripts import *
from tutor.plugins.sympy import *

# Entradas
while True:
    with display_block('Distratores: massa camada'):
        vcorreto = (283, 24)
        jacob = (669, 11)
        mrho = (277, 24)
        lim = (346, 24)
        ans = set([vcorreto, jacob, mrho, lim])
        orig_ans = set(ans)

        while len(ans) < 10:
            a, b = oneof(*list(ans))
            a = int(a * (0.5 + random()))
            if 100 <= a < 1000:
                b += oneof(0, 0, 0, 1, -1)
                ans.add((a, b))
        ans -= orig_ans
        dis1, dis2, dis3, dis4, dis5, dis6 = (('%.2f' % (x / 100.)).replace('.', ',') for x, y in ans)
        alpha1, alpha2, alpha3, alpha4, alpha5, alpha6 = (y for x, y in ans)

    with display_block('Distratores: massa total'):
        vcorreto = (596, 24)
        jacob = (136, 11)
        mrho = (750, 24)
        lim = (107, 25)
        ans = set([vcorreto, jacob, mrho, lim])
        orig_ans = set(ans)

        while len(ans) < 10:
            a, b = oneof(*list(ans))
            a = int(a * (0.5 + random()))
            if 100 <= a < 1000:
                b += oneof(0, 0, 0, 1, -1)
                ans.add((a, b))
        ans -= orig_ans
        mdis1, mdis2, mdis3, mdis4, mdis5, mdis6 = (('%.2f' % (x / 100.)).replace('.', ',') for x, y in ans)
        malpha1, malpha2, malpha3, malpha4, malpha5, malpha6 = (y for x, y in ans)

    break
